\(\int \frac {\log (\frac {2 a}{a+b x})}{(a-b x) (a+b x)} \, dx\) [338]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 24 \[ \int \frac {\log \left (\frac {2 a}{a+b x}\right )}{(a-b x) (a+b x)} \, dx=\frac {\operatorname {PolyLog}\left (2,1-\frac {2 a}{a+b x}\right )}{2 a b} \]

[Out]

1/2*polylog(2,1-2*a/(b*x+a))/a/b

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2458, 2378, 2370, 2352} \[ \int \frac {\log \left (\frac {2 a}{a+b x}\right )}{(a-b x) (a+b x)} \, dx=\frac {\operatorname {PolyLog}\left (2,1-\frac {2 a}{a+b x}\right )}{2 a b} \]

[In]

Int[Log[(2*a)/(a + b*x)]/((a - b*x)*(a + b*x)),x]

[Out]

PolyLog[2, 1 - (2*a)/(a + b*x)]/(2*a*b)

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2370

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)/(x_))^(q_.)*(x_)^(m_.), x_Symbol] :> Int[(e + d*
x)^q*(a + b*Log[c*x^n])^p, x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && EqQ[m, q] && IntegerQ[q]

Rule 2378

Int[((a_.) + Log[(c_.)*(x_)^(n_)]*(b_.))/((x_)*((d_) + (e_.)*(x_)^(r_.))), x_Symbol] :> Dist[1/n, Subst[Int[(a
 + b*Log[c*x])/(x*(d + e*x^(r/n))), x], x, x^n], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IntegerQ[r/n]

Rule 2458

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\log \left (\frac {2 a}{x}\right )}{(2 a-x) x} \, dx,x,a+b x\right )}{b} \\ & = -\frac {\text {Subst}\left (\int \frac {\log (2 a x)}{\left (2 a-\frac {1}{x}\right ) x} \, dx,x,\frac {1}{a+b x}\right )}{b} \\ & = -\frac {\text {Subst}\left (\int \frac {\log (2 a x)}{-1+2 a x} \, dx,x,\frac {1}{a+b x}\right )}{b} \\ & = \frac {\text {Li}_2\left (1-\frac {2 a}{a+b x}\right )}{2 a b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.12 \[ \int \frac {\log \left (\frac {2 a}{a+b x}\right )}{(a-b x) (a+b x)} \, dx=\frac {\operatorname {PolyLog}\left (2,\frac {-a+b x}{a+b x}\right )}{2 a b} \]

[In]

Integrate[Log[(2*a)/(a + b*x)]/((a - b*x)*(a + b*x)),x]

[Out]

PolyLog[2, (-a + b*x)/(a + b*x)]/(2*a*b)

Maple [A] (verified)

Time = 0.83 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.83

method result size
derivativedivides \(\frac {\operatorname {dilog}\left (\frac {2 a}{b x +a}\right )}{2 b a}\) \(20\)
default \(\frac {\operatorname {dilog}\left (\frac {2 a}{b x +a}\right )}{2 b a}\) \(20\)
risch \(\frac {\operatorname {dilog}\left (\frac {2 a}{b x +a}\right )}{2 b a}\) \(20\)
parts \(\frac {\ln \left (\frac {2 a}{b x +a}\right ) \ln \left (b x +a \right )}{2 a b}-\frac {\ln \left (\frac {2 a}{b x +a}\right ) \ln \left (-b x +a \right )}{2 a b}+\frac {b \left (\frac {\ln \left (b x +a \right )^{2}}{2 a \,b^{2}}+\frac {-\operatorname {dilog}\left (-\frac {-b x -a}{2 a}\right )-\ln \left (-b x +a \right ) \ln \left (-\frac {-b x -a}{2 a}\right )}{a \,b^{2}}\right )}{2}\) \(120\)

[In]

int(ln(2*a/(b*x+a))/(-b*x+a)/(b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/2/b/a*dilog(2*a/(b*x+a))

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.88 \[ \int \frac {\log \left (\frac {2 a}{a+b x}\right )}{(a-b x) (a+b x)} \, dx=\frac {{\rm Li}_2\left (-\frac {2 \, a}{b x + a} + 1\right )}{2 \, a b} \]

[In]

integrate(log(2*a/(b*x+a))/(-b*x+a)/(b*x+a),x, algorithm="fricas")

[Out]

1/2*dilog(-2*a/(b*x + a) + 1)/(a*b)

Sympy [F]

\[ \int \frac {\log \left (\frac {2 a}{a+b x}\right )}{(a-b x) (a+b x)} \, dx=- \int \frac {\log {\left (2 \right )}}{- a^{2} + b^{2} x^{2}}\, dx - \int \frac {\log {\left (\frac {a}{a + b x} \right )}}{- a^{2} + b^{2} x^{2}}\, dx \]

[In]

integrate(ln(2*a/(b*x+a))/(-b*x+a)/(b*x+a),x)

[Out]

-Integral(log(2)/(-a**2 + b**2*x**2), x) - Integral(log(a/(a + b*x))/(-a**2 + b**2*x**2), x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 120 vs. \(2 (21) = 42\).

Time = 0.21 (sec) , antiderivative size = 120, normalized size of antiderivative = 5.00 \[ \int \frac {\log \left (\frac {2 a}{a+b x}\right )}{(a-b x) (a+b x)} \, dx=\frac {1}{4} \, b {\left (\frac {\log \left (b x + a\right )^{2} - 2 \, \log \left (b x + a\right ) \log \left (b x - a\right )}{a b^{2}} + \frac {2 \, {\left (\log \left (b x + a\right ) \log \left (-\frac {b x + a}{2 \, a} + 1\right ) + {\rm Li}_2\left (\frac {b x + a}{2 \, a}\right )\right )}}{a b^{2}}\right )} + \frac {1}{2} \, {\left (\frac {\log \left (b x + a\right )}{a b} - \frac {\log \left (b x - a\right )}{a b}\right )} \log \left (\frac {2 \, a}{b x + a}\right ) \]

[In]

integrate(log(2*a/(b*x+a))/(-b*x+a)/(b*x+a),x, algorithm="maxima")

[Out]

1/4*b*((log(b*x + a)^2 - 2*log(b*x + a)*log(b*x - a))/(a*b^2) + 2*(log(b*x + a)*log(-1/2*(b*x + a)/a + 1) + di
log(1/2*(b*x + a)/a))/(a*b^2)) + 1/2*(log(b*x + a)/(a*b) - log(b*x - a)/(a*b))*log(2*a/(b*x + a))

Giac [F]

\[ \int \frac {\log \left (\frac {2 a}{a+b x}\right )}{(a-b x) (a+b x)} \, dx=\int { -\frac {\log \left (\frac {2 \, a}{b x + a}\right )}{{\left (b x + a\right )} {\left (b x - a\right )}} \,d x } \]

[In]

integrate(log(2*a/(b*x+a))/(-b*x+a)/(b*x+a),x, algorithm="giac")

[Out]

integrate(-log(2*a/(b*x + a))/((b*x + a)*(b*x - a)), x)

Mupad [B] (verification not implemented)

Time = 1.20 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.79 \[ \int \frac {\log \left (\frac {2 a}{a+b x}\right )}{(a-b x) (a+b x)} \, dx=\frac {{\mathrm {Li}}_{\mathrm {2}}\left (\frac {2\,a}{a+b\,x}\right )}{2\,a\,b} \]

[In]

int(log((2*a)/(a + b*x))/((a + b*x)*(a - b*x)),x)

[Out]

dilog((2*a)/(a + b*x))/(2*a*b)